import math


def distance(point1, point2):
    return math.sqrt((point2[0] - point1[0]) ** 2 + (point2[1] - point1[1]) ** 2)


def perimeter(point1, point2, point3):
    side1 = distance(point1, point2)
    side2 = distance(point2, point3)
    side3 = distance(point3, point1)
    return side1 + side2 + side3


point1 = [0, 0]
point2 = [1, 0]
point3 = [0, 1]
print(perimeter(point1, point2, point3))
